﻿CREATE PROCEDURE [dbo].[proc_Customer_Subjoin_List_Create]
	(
		@CustomerId nvarchar(50),
		@SubjoinId int,
		@Description nvarchar(500),
		@UpName nvarchar(50),
		@UpTime datetime
	)
AS
	begin
	declare @DepartmentId int
	Set @DepartmentId=(Select DepartmentId From Employee Where UserName=@UpName)
	Insert Into Customer_Subjoin_List
	(
		CustomerId,
		SubjoinId,
		Description,
		UpName,
		UpTime,
		DepartmentId
	)
	Values
	(
		@CustomerId,
		@SubjoinId,
		@Description,
		@UpName,
		@UpTime,
		@DepartmentId
	)
	end
	RETURN
